#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

using namespace std;

#include "mrf.h"


int main()
{
	//KMeans();
	//IplImage* img = cvLoadImage("C:/Temp/3.jpg",0); 
	IplImage* img = cvLoadImage("C:/Temp/test.jpg",0);
	IplImage* labelImg;// = cvCreateImage( cvGetSize(img), 8, 1 ); 
	//cvThreshold(img,labelImg,160,1,CV_THRESH_BINARY);
	labelImg = img;


	MRF *mrf = new MRF();
	//mrf->initLearningMRF(img);
	mrf->initFastMRF(img, labelImg);

	mrf->ouputLabelledImage();

	return 0;
}